package com.woniu.woniuproject.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.woniuproject.entity.LooseLabel;
import com.woniu.woniuproject.entity.Product;
import com.woniu.woniuproject.mapper.Debt_infoMapper;
import com.woniu.woniuproject.mapper.LooseLabelMapper;
import com.woniu.woniuproject.mapper.ProductMapper;
import com.woniu.woniuproject.mapper.Product_accountMapper;
import com.woniu.woniuproject.vo.LooselabeVo;
import com.woniu.woniuproject.vo.OfficiallogoVo;
import com.woniu.woniuproject.vo.PrWebVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 功能描述:<br>
 * 〈〉
 *
 * @author 徐威
 * @create 2020/11/20
 * @since 1.0.0
 */
@Service
public class OfficiallogoService {
    @Autowired
    ProductMapper productMapper;
    @Autowired
    LooseLabelMapper looseLabelMapper;

    public PageInfo<Product> queryByWeb(OfficiallogoVo officiallogoVo) {
        PageHelper.startPage(officiallogoVo.getNowPage(),officiallogoVo.getMaxPage());
        List<Product> list =productMapper.selectByWeb(officiallogoVo);
       return new PageInfo<>(list);
    }

    public PageInfo<LooseLabel> queryByLooselabe(LooselabeVo looselabeVo) {
        PageHelper.startPage(looselabeVo.getNowPage(),looselabeVo.getMaxPage());
        System.out.println(looselabeVo);
        List<LooseLabel> list =looseLabelMapper.selectByWeb(looselabeVo);
        return new PageInfo<>(list);
    }
    @Autowired
    Product_accountMapper product_accountMapper;
    @Autowired
    Debt_infoMapper debt_infoMapper;
    public List<PrWebVo> queryProduct_accountall(Integer id, String type) {
        return product_accountMapper.selectByUid(id,type);
    }

}
